<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
   
class Community_model extends CI_Model{	
	
	function get_community_categories($param = array()){
		$query=$this->db->get_where('community_category',$param);
		return $query->result();
	}
	
	function get_community_visibility($param=array()){
		$query=$this->db->get_where('community_visibility',$param);
		return $query->result();
	}
	
	function add_communty($data){
		$insert = $this->db->insert('community', $data) ? TRUE : FALSE;
		if($insert){
			return $this->db->insert_id();
		}
		return false;
	}
	function add_community_people($data){
		$insert = $this->db->insert('community_people', $data) ? TRUE : FALSE;
		if($insert){
			return $this->db->insert_id();
		}
		return false;
	}
}
